A1=c(1,2,3,4)
A2=c(5,6,7,8)
A3=c(9,10,11,12)
A=matrix(c(A1,A2,A3),nrow=3,ncol=4,byrow=T)
library(pracma)
print(rref(A))

